package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysPositionsPlanMapper;
import com.ruoyi.system.domain.SysPositionsPlan;
import com.ruoyi.system.service.ISysPositionsPlanService;

/**
 * 招聘计划信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-16
 */
@Service
public class SysPositionsPlanServiceImpl implements ISysPositionsPlanService 
{
    @Autowired
    private SysPositionsPlanMapper sysPositionsPlanMapper;

    /**
     * 查询招聘计划信息
     * 
     * @param planId 招聘计划信息主键
     * @return 招聘计划信息
     */
    @Override
    public SysPositionsPlan selectSysPositionsPlanByPlanId(Long planId)
    {
        return sysPositionsPlanMapper.selectSysPositionsPlanByPlanId(planId);
    }

    /**
     * 查询招聘计划信息列表
     * 
     * @param sysPositionsPlan 招聘计划信息
     * @return 招聘计划信息
     */
    @Override
    public List<SysPositionsPlan> selectSysPositionsPlanList(SysPositionsPlan sysPositionsPlan)
    {
        return sysPositionsPlanMapper.selectSysPositionsPlanList(sysPositionsPlan);
    }

    /**
     * 新增招聘计划信息
     * 
     * @param sysPositionsPlan 招聘计划信息
     * @return 结果
     */
    @Override
    public int insertSysPositionsPlan(SysPositionsPlan sysPositionsPlan)
    {
        sysPositionsPlan.setCreateTime(DateUtils.getNowDate());
        return sysPositionsPlanMapper.insertSysPositionsPlan(sysPositionsPlan);
    }

    /**
     * 修改招聘计划信息
     * 
     * @param sysPositionsPlan 招聘计划信息
     * @return 结果
     */
    @Override
    public int updateSysPositionsPlan(SysPositionsPlan sysPositionsPlan)
    {
        sysPositionsPlan.setUpdateTime(DateUtils.getNowDate());
        return sysPositionsPlanMapper.updateSysPositionsPlan(sysPositionsPlan);
    }

    /**
     * 批量删除招聘计划信息
     * 
     * @param planIds 需要删除的招聘计划信息主键
     * @return 结果
     */
    @Override
    public int deleteSysPositionsPlanByPlanIds(Long[] planIds)
    {
        return sysPositionsPlanMapper.deleteSysPositionsPlanByPlanIds(planIds);
    }

    /**
     * 删除招聘计划信息信息
     * 
     * @param planId 招聘计划信息主键
     * @return 结果
     */
    @Override
    public int deleteSysPositionsPlanByPlanId(Long planId)
    {
        return sysPositionsPlanMapper.deleteSysPositionsPlanByPlanId(planId);
    }
}
